FROM hyperf/hyperf:7.3-alpine-cli
#RUN /bin/sh
#
## 在容器内安装 Composer
RUN apk add composer
#RUN wget https://github.com/composer/composer/releases/download/1.8.6/composer.phar
#
#RUN chmod u+x composer.phar
#
#RUN composer.phar /usr/local/bin/composer
# 将 Composer 镜像设置为阿里云镜像，加速国内下载速度
RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
#
# 通过 Composer 安装 hyperf/hyperf-skeleton 项目
RUN composer create-project hyperf/hyperf-skeleton
#
# 进入安装好的 Hyperf 项目目录
RUN cd /hyperf-skeleton
RUN ls bin/
## 启动 Hyperf
RUN php /hyperf-skeleton/bin/hyperf.php start